package com.biz.impl;

import com.dao.CustomerNotesDao;
import com.entity.model.CustomerNotes;
import com.biz.CustomerNotesBiz;
import com.core.AbstractBiz;
import com.entity.vo.CustomerNotesVO;
import com.util.webpage.PageData;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;


/**
 * Created by jc on 2019/11/16.
 */
@Service
@Transactional
public class CustomerNotesBizImpl extends AbstractBiz<CustomerNotes> implements CustomerNotesBiz {
    @Resource
    private CustomerNotesDao customerNotesDao;

    public List<CustomerNotes> findNotesList(PageData cond){
        return customerNotesDao.findNotesList(cond);
    }

    public List<CustomerNotesVO> notesList(Integer type, Integer customerId){
        return customerNotesDao.notesList(type,customerId);
    }

    public  CustomerNotes getNotesDetail(Integer notesId,Integer customerId){
        return customerNotesDao.getNotesDetail(notesId,customerId);
    }

    public List<CustomerNotesVO> myNotesList(Integer customerId, Integer notesType){
        return customerNotesDao.myNotesList(customerId,notesType);
    }

    public void deleteByCustomerId(Integer customerId){
        customerNotesDao.deleteByCustomerId(customerId);
    }
}
